Skip to content

fix: safe bullet pattern — never use display:grid on li with inline code#67

Open
MageByte-Zero wants to merge 1 commit into
zarazhangrui:mainfrom
MageByte-Zero:fix/bullet-display-grid
Open

fix: safe bullet pattern — never use display:grid on li with inline code#67
MageByte-Zero wants to merge 1 commit into
zarazhangrui:mainfrom
MageByte-Zero:fix/bullet-display-grid

Conversation

@MageByte-Zero

Copy link
Copy Markdown

Problem

Generated presentations that use display:grid or display:flex on <li> elements containing inline <code> render with broken bullets. CSS grid wraps each text node and inline element in anonymous boxes, swallowing the bullet marker into one of those boxes. The list either shows no bullets, misaligned bullets, or bullets appearing inside the text flow.

This reproduces reliably whenever a feature list mixes plain text and inline code: <li>Use <code>clamp()</code> for all sizes</li>.

Closes #62.

Fix

Document the root cause and provide the safe alternative: position: absolute on ::before for the bullet marker. This pattern correctly handles inline elements, nested lists, and screen readers.

Relation to existing PRs

No open PR addresses this. Issue #62 has been open since 2026-05-10 with no fix submitted.

Testing

Tested locally with a feature list containing inline <code> — the position:absolute ::before pattern renders correctly in all browsers.

CSS grid on <li> creates anonymous boxes per text node and inline
element, swallowing the bullet marker into one of those boxes. Bullets
render broken or misaligned. Closes zarazhangrui#62.

Documents the safe position:absolute ::before hanging-indent pattern
that works correctly with inline <code>, nested lists, and screen readers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: bullets render broken when <li> uses display:grid with inline <code>

1 participant